package com.project.demo.controller;

import com.project.demo.service.WaterService;
import com.project.demo.vo.WaterVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class WaterController {
    @Autowired
    private WaterService waterService;
    @RequestMapping("/water")
    public WaterVo findWaterVo(Integer page,Integer limit){
        return waterService.FindWaterVo(page, limit);
    }
    @RequestMapping("/water1")
    public WaterVo findAllWaterVo(){
        return waterService.FindAllWaterVo();
    }
    @RequestMapping("/water1/{name}")
    public Integer deleteVo(@PathVariable("name") Integer name){
        return waterService.deleteVo(name);
    }
}
